import slideTransition from './slide'
import popTransition from './pop'
import defaultTransition from './default'

export default function (transitionProps, prevTransitionProps){
    const { scene } = transitionProps;
    const { route } = scene;
    const params = route.params || {};
    const transition = params.transition || 'default';
    let ret = {}
    switch (transition){
        case 'slide':
            ret = slideTransition(transitionProps, prevTransitionProps);
            break;
        case 'pop':
            ret = popTransition(transitionProps, prevTransitionProps);
            break;
        case 'default':
            ret = defaultTransition(transitionProps, prevTransitionProps);
            break;
    }

    return ret;
}